<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Oncustomer extends Model
{

    protected $guarded = [];
    protected $table = 'oncustomers';


    public function company(){
        return $this->belongsTo('App\Models\Company');
    }
    public function store(){
        return $this->belongsTo('App\Models\Store');
    }
    public function coupon(){
        return $this->belongsToMany('App\Models\Coupon','coupon_oncustomers')->withPivot('is_can','coupon_num');
    }





}
